<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="__ROOT__/Public/admin/css/style.css" rel="stylesheet">
<link href="__ROOT__/Public/admin/css/font-awesome.min.css" rel="stylesheet">
<title>{$title}</title>
</head>

<body>
    <div class="breadNav">
        <ul class="breadNavBar">
            <li><i class="icon-home" style="font-size:16px"></i></li>
            <li><a href="javascript:;" onClick="parent.location.reload('__ROOT__/Admin/Main/index');">首页</a></li>
            <li>&gt;</li>
            <li><a href="javascript:;">分类</a></li>
            <li>&gt;</li>
            <li>分类列表</li>
        </ul>
    </div>
    <div style="clear:both;"></div>
    <div class="filter">
        <div class="form-group" style="float:right">
        </div>
        
    </div>
    <div class="tableBox">
    <div class="filter">
			
			<div class="form-group" style="float:right">
				<form action="__ROOT__/Admin/YatiAds/YatiAds_cata_list" method="get">
                    <label class="control-label">选择押题一级分类:</label>
                    <select class="form-control" name="level_one">
                    <volist name="CataOne" id="vo">
                     <option value='{$vo.id}'>{$vo.catname}</option>
                    </volist>
                    </select>
					<button class="btn btn-primary add" type="submit"><i class="icon-search"></i>&nbsp;提交</button>
				</form>
			</div>
		</div>
    <table class="table">
        <thead>
			<tr>
				<th  colspan="10" class="w_60">类别名</th>
				
				<th colspan="7">操作</th>		
			</tr>
        </thead>
        <tbody id="dataInfo">
            <volist name="cata_list" id="catList">
            <tr class="line_g hover_bg">
                <td colspan="10" align="left" >
                <span style="padding-right:0.5em;"></span>
<!--                 <if condition="$categoryList.img eq '1'"> -->
<!--                 <img align="absmiddle" src="__ROOT__/Public/admin/images/category/x2.png" /> -->
<!--                 <else /> -->
<!--                 <img align="absmiddle" src="__ROOT__/Public/admin/images/category/x3.png" /> -->
<!--                 </if> -->
                <img align="absmiddle" src="__ROOT__/Public/admin/images/category/open.png" onClick="menuDisplay(this,'s'+{$categoryList.id});" />
                {$catList.catname}
                </td>
                                 
                <td colspan="7" align="center">
              
                    <a href="__ROOT__/Admin/YatiAds/editCat/id/{$catList.id}" class="btn btn-primary exit"><i class="icon-edit"></i>&nbsp;编辑</a>
                   
                </td>
            </tr>
                                                      
            </volist>
        </tbody>
    </table>
    </div>
	<div class="pageBarBox">
		{$page}
	</div>
</body>
<script src="__ROOT__/Public/js/jquery.min.js?ver=1.8.3"></script>
<script src="__ROOT__/Public/admin/js/main.js"></script>
<script src="__ROOT__/Public/js/titleMes.js"></script>
<script>
function SortUp(sortid,id){
	  $.ajax({
		  type:"POST",
		  url:"__ROOT__/Admin/Category/categorySortUp",
		  data:{sortid:sortid,id:id},
		  cache:false,
		  async:false,
		  dataType:"text",
		  beforeSend:function(XMLHttpRequest){
		  },
		  success:function(html) {
				if(html==1){
					 location.replace('__ROOT__/Admin/Category/categoryList');
				}
		  },
		  error:function(XMLHttpRequest, textStatus, errorThrown) {
			  alert('请求异常，请联系管理员!');
		  }
	  }).responseText;	
}
function SortDown(sortid,id){
	  $.ajax({
		  type:"POST",
		  url:"__ROOT__/Admin/Category/categorySortDown",
		  data:{sortid:sortid,id:id},
		  cache:false,
		  async:false,
		  dataType:"text",
		  beforeSend:function(XMLHttpRequest){
		  },
		  success:function(html) {
				if(html==1){
					 location.replace('__ROOT__/Admin/Category/categoryList');
				}
		  },
		  error:function(XMLHttpRequest, textStatus, errorThrown) {
			  alert('请求异常，请联系管理员!');
		  }
	  }).responseText;	
}
function menuDisplay(obj,idval){
	var d=$(obj).attr('alt');
	if($("."+idval).is(":visible")){
		$(obj).attr('src','__ROOT__/Public/admin/images/category/close.png');
		$("."+idval).hide();
	}else{
		$(obj).attr('src','__ROOT__/Public/admin/images/category/open.png');
		$("."+idval).show();		
	}		
}
</script>
</html>
